#include <iostream>
#include "namepipe.hpp"

int main()
{
    namepipe pipe(gpathname, gUser);  //使用者获取管道
    if (gDefault != pipe.OpenPipeWrite())  //打开管道写端
    {
        std::string message;
        while (true)
        {
            std::cout << "Enter massage> ";
            std::getline(std::cin, message);
            pipe.DeliverMassage(message);  //往管道写入数据
        }
    }

    return 0;
}